<template>
	<list-scroll class="list-scroll" @scroll="scroll">
		<view>
			<list-card :cardData="item" v-for="item in list" :key="item._id"></list-card>
		</view>
		<uni-load-more v-if="list.length === 0 || list.length > 7" :status="load.loading || 'loading'" iconType="snow"></uni-load-more>
	</list-scroll>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default: () => []
			},
			load: {
				type: Object,
				default: () => ({
					loading: 'loading'
				})
			}
		},
		methods: {
			scroll() {
				this.$emit('scroll')
			}
		},
	}
</script>

<style>
	.list-scroll {
		height: 100%;
	}
</style>
